package com.towexin.application.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * TODO
 *
 * @author Towexin
 * @version 1.0
 * @date 2021/4/27 16:29
 */
@Data
@TableName("t_system_setting")
public class SystemSetting implements Serializable {
    private static final long serialVersionUID = 480753144679067740L;

    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 系统基础
     */
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String webTitle;
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String systemName;
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String systemLogo;

    /**
     * 菜单设置
     */
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Boolean menuAccordion;      // 是否同时只打开一个菜单目录
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Boolean menuControl;        // 是否开启多系统菜单模式
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String menuSelect;          // 默认选中的菜单项

    /**
     * tab配置
     */
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Boolean muiltTab;        // 是否开启多选项卡
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Boolean tabKeepState;       // 选项卡切换时，是否保持页面(true: 保持页面, false: 刷新页面)
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Boolean tabSession;         // 开启选项卡记忆
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Integer tabMax;             // 最大可打开的选项卡数量

    /**
     * 主题配置
     */
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Integer themeDefaultColor;   // 默认主题色，对应 colors 配置中的 ID 标识
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String themeDefaultMenu;    // 默认的菜单主题 dark-theme 黑 / light-theme 白
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Boolean themeAllowCustom;   // 是否允许用户切换主题，false 时关闭自定义主题面板

    /**
     * 颜色配置
     */
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String colorJsonData;       // 颜色 json 数据 [{id: 1, color: "#000"}]

    /**
     * 其他配置
     */
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String otherKeepLoad;       // 系统加载动画时长
    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Boolean otherAutoHead;      // 布局顶部主题

    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String link;                // 系统链接


    @ApiParam(value = "创建时间，系统赋值")
    @TableField(fill = FieldFill.INSERT, insertStrategy = FieldStrategy.NOT_NULL)
    private Date createdTime;

    @ApiParam(value = "更新时间，系统赋值")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
}
